<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <title>KeeWeb Test Runner</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
    </head>
    <body>
        <div id="mocha"></div>

        <script>
            window.output = [];

            console.log = (...args) => window.output.push({ method: 'log', args });
            console.info = (...args) => window.output.push({ method: 'info', args });
            console.error = (...args) => window.output.push({ method: 'error', args });
            console.warn = (...args) => window.output.push({ method: 'warn', args });
        </script>

        <script src="../node_modules/mocha/mocha.js"></script>

        <script class="mocha-init">
            mocha.setup('bdd');
            mocha.checkLeaks();
        </script>
        <script src="dist/test.bundle.js"></script>
        <script class="mocha-exec">
            mocha.reporter('spec');
            mocha.run(failures => (window.done = { failures }));
        </script>
    </body>
</html>
